# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-maps
pkgver=40.4
pkgrel=1
pkgdesc="A simple GNOME 3 maps application"
url="https://wiki.gnome.org/Apps/Maps"
arch=(x86_64)
license=(GPL)
depends=(geocode-glib geoclue gjs libchamplain libgee folks gfbgraph libhandy)
makedepends=(gobject-introspection git meson yelp-tools)
groups=(gnome)
_commit=619a163ee75589c11744e524de7aa450339d71d7  # tags/v40.4^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-maps.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
